home *** CD-ROM | disk | FTP | other *** search
/ Network Supervisor's Toolkit / Network Supervisor's Toolkit.iso / tools / nwtp06 / appn9008.txt < prev    next >
Text File  |  1996-07-10  |  15KB  |  289 lines

  1. (Note: AppNote August 1990)
  2.  
  3. A Comparison of NetWare IPX, SPX and NetBIOS 
  4.  
  5.  Bill Bodine
  6.  Consultant
  7.  Systems Engineering Division
  8.  
  9. Abstract:
  10.  
  11. One of the first questions always asked during comparisons of NetWare 
  12. IPX, SPX and NetBIOS is which of these protocols will transfer data 
  13. the fastest, and how much slower the others are. This AppNote details 
  14. the results of four benchmarks written to illustrate the relative 
  15. speed of each of these communication interfaces. Performance, maximum 
  16. packet length, naming capabilities and memory usage are each singled 
  17. out as additional factors in the decision to implement systems using 
  18. these protocols. Clarification and explanation of SHELL.CFG parameters 
  19. are also included.
  20.  
  21. Novell, Inc. makes no representations or warranties with respect to 
  22. the contents or use of these Application Notes, or any of the third-party 
  23. products discussed in the AppNotes. Novell reserves the right to revise 
  24. these Application Notes and to make changes in their contents at any 
  25. time, without obligation to notify any person or entity of such revisions 
  26. or changes. These AppNotes do not constitute an endorsement of the 
  27. third-party product or products that were tested. The configuration 
  28. or configurations tested or described may or may not be the only available 
  29. solution. Any test is not a determination of product quality or
  30. correctness, nor does it ensure compliance with any federal, state or local
  31. requirements. Novell does not warranty products except as stated in
  32. applicable Novell product warranties or license agreements.
  33.  
  34. Copyright { 1990 by Novell, Inc., Provo, Utah. All rights reserved.
  35.  
  36. As a means of promoting NetWare Application Notes, Novell grants you 
  37. without charge the right to reproduce, distribute and use copies of 
  38. the AppNotes provided you do not receive any payment, commercial benefit 
  39. or other consideration for the reproduction or distribution, or change 
  40. any copyright notices appearing on or in the document.
  41.  
  42. Introduction
  43.  
  44. When Novell began operations in 1982, several proprietary protocols 
  45. for transferring data between workstations were used. As time went 
  46. on, the decision was made to base Novell's network communications 
  47. on a fast and efficient networking standard. Xerox's XNS protocol 
  48. was determined to be one of the best available at the time so Novell's 
  49. Internetwork Packet Exchange (IPX) protocol was developed to conform 
  50. to the XNS standard. NetWare IPX is functionally equivalent to Xerox's 
  51. Internet Datagram Protocol (IDP). 
  52.  
  53. This AppNote discusses the three primary peer-to-peer protocols 
  54. that are supported in the NetWare LAN environment-NetWare IPX, SPX 
  55. and NetBIOS. Additional protocols supported include the Transport 
  56. Layer Interface (TLI), Named Pipes, LU6.2 and others, but are not 
  57. covered in this AppNote.
  58.  
  59. NetWare IPX
  60.  
  61. NetWare IPX is a true datagram protocol. It makes a best-effort 
  62. attempt to send packets by using a 12-byte addressing scheme. 
  63. The 12-byte address is split into three addresses: the network 
  64. address, which is used to address individual workgroups; the node 
  65. address, which addresses network nodes within the workgroups; and 
  66. the socket address, which can be used to multiplex between functions 
  67. within a network node. When sending an NetWare IPX packet from one 
  68. node to another, the sending node must know the receiving node's 12-byte 
  69. address. 
  70.  
  71. SPX
  72.  
  73. The Sequenced Packet Exchange protocol (SPX) is a connection-oriented 
  74. communications protocol that is built upon NetWare IPX. When a call 
  75. is made to SPX to send a packet by an application program, SPX will 
  76. do some housekeeping-type work on the packet, but will call NetWare 
  77. IPX to actually send the packet. SPX guarantees packet delivery, whereas 
  78. NetWare IPX only gives a best effort to deliver packets. This added 
  79. feature of SPX has obvious advantages, but as we shall see later in 
  80. the paper, it also adds overhead to the data transfer cycle and is 
  81. slower. 
  82.  
  83. NetBIOS
  84.  
  85. The Network Basic Input/Output System (NetBIOS) functions in either 
  86. a connectionless mode or a connection-oriented mode. An application 
  87. written to the NetBIOS interface can be designed to use either of 
  88. these modes. For instance, if an application functions in a request/reply 
  89. mode with a transfer size of only one packet, then the connectionless 
  90. mode should be used to take advantage of connectionless response times. 
  91. On the other hand, if most of the transfers are one-sided or consist 
  92. of large numbers of packets, the transfers should use the connection-
  93. oriented mode in order to ensure packet delivery and integrity of data. 
  94. Novell's NetBIOS emulator is built upon NetWare IPX in the same way 
  95. that SPX is.
  96.  
  97. The NetBIOS emulator is called an emulator because it is implemented 
  98. entirely in software, whereas the original NetBIOS introduced by IBM 
  99. and Sytek was located in firmware. 
  100.  
  101. Because NetBIOS was introduced by IBM, it was almost instantly accepted 
  102. as an industry standard. Most networking vendors have implemented 
  103. the specification given by IBM that allows almost any application 
  104. written to the NetBIOS interface to operate in any environment. 
  105.  
  106. A common problem with the NetBIOS specification, however, is that 
  107. it only deals with the upper layer functions of the interface. It 
  108. does not specify what communications protocol should be used underneath 
  109. it. As a result, almost every networking vendor has written NetBIOS 
  110. on top of their own proprietary communications protocol, which cannot 
  111. communicate with other vendors' protocols. 
  112.  
  113. A nice feature that NetBIOS has to offer the networking industry is 
  114. its allowance of easy address resolution among locally-connected 
  115. workstations. All nodes on a network that use NetBIOS register a unique 
  116. name. When a node desires to communicate with another node, all it 
  117. needs to know is the node's unique NetBIOS name and NetBIOS will ensure 
  118. that the packet arrives at the proper location. 
  119.  
  120. Performance Results
  121.  
  122. One of the first questions regarding the comparison of NetWare IPX, 
  123. SPX and NetBIOS is which of these protocols will transfer data the 
  124. fastest, and how much slower the others are. As part of this AppNote, 
  125. four benchmarks have been written to illustrate the relative speed 
  126. of each of these communications interfaces. The scope of the benchmark 
  127. is relatively simple-to send 2,000 255-byte packets and to record 
  128. the time that it takes for the transfer to complete. All the programs 
  129. were written by the same person and were intentionally kept as simple 
  130. as possible to make each benchmark represent the speed of the interface 
  131. and not efficiencies or lack thereof in the benchmark tests. 
  132.  
  133. Each of the benchmarks encompassed two programs. One program 
  134. was used to send packets and the other was used to receive. The sending 
  135. side sent a packet and then incremented a counter. Before the packet 
  136. was sent, a call was made by the sender to the system clock. Once 
  137. the 2,000th packet had been sent successfully, another call was made 
  138. to the system clock. The first value was subtracted from the second 
  139. and the result represented the time in clock ticks that it took to 
  140. send 2,000 packets on the given communication interface. The receiving 
  141. side did nothing but receive packets and count the number that arrived. 
  142. No other processing took place within the code.
  143.  
  144. The following results were achieved on standard 8MHz 80286-based 
  145. machines on a 4MB Token-Ring network. While the test does not 
  146. represent any real-world scenario, it does indicate the relative 
  147. speed of each interface tested. 
  148.  
  149.      NetWare IPX              366.0 packets per second 
  150.  
  151.      SPX                      140.3 packets per second
  152.  
  153.      Novell NetBIOS datagram  224.8 packets per second
  154.  
  155.      Novell NetBIOS session   135.9 packets per second
  156.  
  157. NetWare IPX is the fastest protocol available from Novell. This is 
  158. expected since all others are written in terms of NetWare IPX. SPX 
  159. and NetBIOS are slower than NetWare IPX due to the extra overhead 
  160. they introduce into the communications process. SPX and the NetBIOS 
  161. session level interface run at virtually the same speed. They both 
  162. have to maintain the same level of connection overhead for the 
  163. guaranteeing of packets and are both written in terms of another 
  164. interface. 
  165.  
  166. Other Decision Criteria
  167.  
  168. There are a few primary differences between writing an application 
  169. to NetWare IPX or SPX and writing an application to NetBIOS. Two of 
  170. these differences deal with the maximum length of packets that can 
  171. be sent and the address resolution. 
  172.  
  173. Maximum Packet Length
  174.  
  175. With NetWare IPX and SPX the maximum packet size that can be sent 
  176. by an application depends on either of two things. If the packet to 
  177. be sent must cross a NetWare bridge, the maximum packet size possible 
  178. is 576 bytes. The bridge will drop any packets that exceed this size. 
  179.  
  180. On the other hand, if the packet will not be crossing any bridges, 
  181. the network interface card (NIC) drivers limit the size. While most 
  182. drivers allow packets of 1,024 bytes or larger to be transferred, 
  183. NetWare documentation recommends that the maximum size transferred 
  184. be 576 bytes. This is in case the packet crosses a bridge or the driver 
  185. cannot handle larger packets. 
  186.  
  187. NetBIOS allows an application to send packets up to 64KB in size. 
  188. This is possible because the NetBIOS emulator breaks the packet into 
  189. smaller packets for the application and sends them out in sizes that 
  190. can be handled by NetWare IPX and the NIC drivers. While this feature 
  191. is useful, some developers choose to split packets up themselves in 
  192. order to optimize the NetWare IPX bandwidth for their application. 
  193. This may or may not be a factor in different situations. 
  194.  
  195. Naming Capabilities
  196.  
  197. The second primary difference is the naming capability supplied with 
  198. NetBIOS. NetBIOS makes it convenient for an application to determine 
  199. the addresses of other nodes on the network. Each workstation identifies 
  200. itself with a particular name. Once any other workstation on the LAN 
  201. knows that name, data can be sent between the two workstations. 
  202.  
  203. Novell recognized the need for this easy address resolution when it 
  204. developed NetWare IPX, so the Service Advertising Protocol (SAP) was 
  205. developed. With SAP, a node advertises, or broadcasts to the entire 
  206. network its name and address. This name and address are stored internally 
  207. on all NetWare network file servers. When any other node wants to 
  208. find an address, it queries a NetWare file server and the necessary 
  209. information is returned. There are also other ways of finding an address 
  210. without accessing the NetWare file server, but they are not as common. 
  211.  
  212. Both of these methods have advantages and disadvantages. While it 
  213. is probably easier for an application with the naming capability of 
  214. NetBIOS to be developed, using the SAP provided by NetWare does not 
  215. require much more work. The advantage gained by using the SAP is that 
  216. once the address is resolved, the underlying protocol is very fast. 
  217. The SAP is designed for a client-server environment, which means 
  218. that a client always initiates a dialogue with the server. The client 
  219. can always find the server's address through the SAP. Since all packets 
  220. on the network contain the 12-byte address of the node they were 
  221. sent from, the server will know which address to send responses to.
  222.  
  223. Memory Usage
  224.  
  225. When an application runs on a network workstation, particularly in 
  226. the DOS environment, the amount of memory that is free for the application 
  227. to use is often a primary concern. In NetWare the first software to 
  228. load on the network is a terminate-and-stay-resident (TSR) 
  229. program called IPX.COM. This program contains all the interfaces needed 
  230. to run NetWare IPX programs and SPX, and uses about 14KB of workstation 
  231. memory. This is the only piece of NetWare software that needs to be 
  232. run in the workstation if no communications are needed with any file 
  233. servers. If a file server is needed, the TSR NET3.COM is loaded after 
  234. IPX.COM. This program contains all the functions needed by the workstation 
  235. to communicate with any NetWare file server on the LAN. It uses about 
  236. 38KB of workstation memory. NetBIOS is an optional TSR like NET3.  
  237. IPX.COM must be loaded first. When NetBIOS is loaded it takes up about 
  238. 30KB of workstation memory. Just as NET3 is only used when communications 
  239. are sent to a NetWare file server, NetBIOS is only run if an application 
  240. needs to use the NetBIOS services. Native NetWare does not use NetBIOS 
  241. for any of its communications services.
  242.  
  243. Appendix A lists parameters that have been modified in the recent 
  244. versions of NetBIOS. Because of the differences among versions, they 
  245. will be discussed as they relate to the specific versions. 
  246.  
  247. The values listed in Appendix A are approximates. It is not possible 
  248. to state exactly how much memory any of the three protocols will use 
  249. up because they all contain custom parameters that change their sizes 
  250. and configurations. The parameters that alter these configurations 
  251. are located in a file named SHELL.CFG. As IPX.COM or NetBIOS.EXE is 
  252. loaded, it looks for this file in the local directory or a search 
  253. directory. Once it locates SHELL.CFG it searches within the file to 
  254. determine if any of its default parameters have been altered. These 
  255. parameters can be configured from within the SHELL.CFG file. Appendix 
  256. B of the NetWare Supervisor Reference manual also explains 
  257. the parameters.
  258.  
  259. Conclusion
  260.  
  261. While the primary advantage of writing to NetWare IPX is speed, the 
  262. main advantage of writing to NetBIOS is that the application will 
  263. work on other environments in addition to NetWare. This should obviously 
  264. be considered for applications that are marketed on a variety of platforms.
  265.  
  266. Even though different vendors' NetBIOSs can rarely communicate with 
  267. each other, most applications do port well over these vendors'
  268. implementations.
  269.  
  270. There are a variety of reasons applications are developed to 
  271. one protocol or another. One reason a protocol is chosen is because 
  272. it is perceived as the defacto standard. For many developers, NetBIOS 
  273. is seen as a standard. Applications are developed to that platform 
  274. for reasons of portability to a variety of environments. On the other 
  275. hand, many developers are developing to NetWare IPX because they recognize 
  276. NetWare's large market share and want to reach the greatest market 
  277. possible with the most efficient protocol available.      
  278.  
  279. Sometimes, one protocol may be perceived as easier to develop to than 
  280. another. Of course whether one is actually easier than another depends 
  281. entirely on the resources that are available, such as the Novell C 
  282. Interface libraries for NetWare IPX and SPX, the experience of the 
  283. development team or even available documentation and training.
  284.  
  285. Appendix A: SHELL.CFG Parameters
  286.  
  287. ******* Note: The appendix (mostly outdated info) has been removed ********
  288.  
  289.